<template>
	<!-- 联系客服 -->
	<view class="customerservice-wrap">
		<view class="customerservice-content mt-60">
			添加客服企业微信
		</view>
		<view class="flex items-center justify-center mb-60 mt-60">
			<up-image :show-loading="true" :src="companyQrCode" width="309px" height="303px" @click="click"></up-image>
		</view>
		<view class="flex items-center justify-center mt-20">
			<up-image :show-loading="true" :src="IMG_URL2+'common/phone-telephone.svg'" width="20px" height="20px" @click="click"></up-image>
			<view class="phonenumber">客服电话:{{ customerMobile?customerMobile:'暂无电话' }}</view>
		</view>
	</view>
</template>

<script setup>
import { IMG_URL2 } from "@/config";

import { shopApi } from "@/api";
let companyQrCode = ref('')
let customerMobile = ref('')
const getData=()=>{
	//TODO: 此接口接入了登录校验，需要在后端解除登录校验
	shopApi.SHOPGETCURRENTSHOPINFO().then((res) => {
		if (res.code == 200) {
			companyQrCode.value = res.result.companyQrCode
			customerMobile.value = res.result.customerMobile
		} else {
			uni.showToast({ title: res.errMsg, icon: "none" });
		}

	})
}
onLoad((options) => {
	getData()
})
</script>

<style lang="scss" scoped>
.customerservice-wrap{
	.customerservice-content{
		font-family: PingFang SC;
		font-size: 16px;
		font-weight: 600;
		line-height: 24px;
		text-align: center;
	}
	.phonenumber{
		font-family: PingFang SC;
		font-size: 16px;
		font-weight: 400;
		line-height: 24px;
		text-align: center;
		color: rgba(0, 0, 0, 0.9);
		margin-left: 10rpx;
	}
}

</style>
